package uk.ac.aber.paws.client.state;

/**
 * @author Rob Johnson, Aberystwyth University
 * @email rob.johnson@aber.ac.uk
 * @date 16th August 2011
 * 
 * PowerEventInfo.java
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

public class PowerEventInfo {

	/**
	 * Stores the time that the computer last woke up from sleep mode. Required to prevent a computer 
	 * returning to sleep within an immunity period following a wake event.
	 */
	private long lastWake = -1l;
	
	/**
	 * Stores the time that the computer last woke up from sleep mode. Required to prevent a computer 
	 * returning to sleep within an immunity period following a wake event.
	 */
	private long lastSleep = -1l;

	/**
	 * Sets the last wake up time for this computer
	 * @param wakeUpTime The number of seconds since 1970 that the computer last woke up
	 */
	public void setLastWake(long wakeUpTime) {
		lastWake = wakeUpTime;
	}
	
	public void setLastSleep(long sleepTime) {
		lastSleep = sleepTime;
	}
	
	public long getLastSleep() {
		return lastSleep;
	}
	
	/**
	 * @return  Returns the time of the last wake up event in milliseconds since 1970 something
	 */
	public long getLastWake() {
		return lastWake;
	}
}
